home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / libs / initstruct.h < prev    next >
C/C++ Source or Header  |  1996-10-23  |  2KB  |  55 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: initstruct.h,v 1.5 1996/10/23 14:05:42 aros Exp $
  4.     $Log: initstruct.h,v $
  5.     Revision 1.5  1996/10/23 14:05:42  aros
  6.     #define was renamed
  7.  
  8.     Revision 1.4  1996/10/21 20:53:17  aros
  9.     Changed BIG_ENDIAN to AROS_BIG_ENDIAN
  10.  
  11.     Revision 1.3  1996/10/19 17:07:29  aros
  12.     Include <aros/machine.h> instead of machine.h
  13.  
  14.     Revision 1.2  1996/08/01 17:41:30  digulla
  15.     Added standard header for all files
  16.  
  17.     Desc:
  18.     Lang:
  19. */
  20. #ifndef _INITSTRUCT_H_
  21. #define _INITSTRUCT_H_
  22. #include <aros/machine.h>
  23.  
  24. typedef BYTE type_B;
  25. typedef WORD type_W;
  26. typedef LONG type_L;
  27.  
  28. #define S_DEF(i,l) union                                                        \
  29.            {                                \
  30.              struct _##i { l } _l;                    \
  31.              char _s[(sizeof(struct _##i)+AROS_LONGALIGN-1)&~(AROS_LONGALIGN-1)]; \
  32.            } _##i
  33.  
  34.  
  35. #define CODE_B 0x20
  36. #define CODE_W 0x10
  37. #define CODE_L 0x00
  38.  
  39. #define S_CPY(i,n,t)      S_DEF(i,UBYTE _cmd; type_##t _data[(n)];)
  40. #define S_REP(i,n,t)      S_DEF(i,UBYTE _cmd; type_##t _data;)
  41. #define S_CPYO(i,n,t)     S_DEF(i,UBYTE _cmd; UBYTE _ofst; type_##t _data[(n)];)
  42. #define S_CPYO24(i,n,t)   S_DEF(i,ULONG _cmd; type_##t _data[(n)];)
  43. #define S_END(i)          UBYTE _##i
  44. #define I_CPY(n,t)        CODE_##t|((n)-1)
  45. #define I_REP(n,t)        0x40|CODE_##t|((n)-1)
  46. #define I_CPYO(n,t,o)     0x80|CODE_##t|((n)-1), (o)
  47. #if AROS_BIG_ENDIAN
  48. #define I_CPYO24(n,t,o)   (0xc0|CODE_##t|((n)-1))<<24|(o)
  49. #else
  50. #define I_CPYO24(n,t,o)   0xc0|CODE_##t|((n)-1)|(o)<<8
  51. #endif
  52. #define I_END()           0
  53.  
  54. #endif
  55.